In a hybrid programming environment, such as a server program with an embedded script engine, scripts (for example, JavaScript) are executed. During execution, host objects and script objects are created. When the script either completes execution or terminates, the host objects and script objects are deleted only when a scheduled memory management mechanism, such as a garbage collector, is periodically run. Until the scheduled memory management mechanism runs, memory associated with the host objects and script objects remains unavailable to the server program even though the programming environment no longer requires those objects. The server program has no knowledge of objects that are no longer referenced/required by the embedded script engine. Therefore, it would be helpful for the server program to know when objects, in particular, host objects, are no longer referenced by the embedded script engine so that the server program may immediately delete those objects to free up space within the programming environment.